#pragma once

#include <func.h>

typedef char* K;
typedef char* V;

typedef struct entry 
{
    K key;
    V val;
    struct entry* next;
} Entry;

typedef struct 
{
    Entry** table;
    size_t capacity;
    size_t size;
    uint32_t hashseed;
} Configuration;

// API
void configuration_init(Configuration* conf);
void configuration_destroy(Configuration* conf);

void configuration_load(Configuration* conf, const char* file);
void configuration_put(Configuration* conf, K key, V value);
V configuration_get(Configuration* conf, K key);
void configuration_delete(Configuration* conf, K key);
void configuration_display(const Configuration* conf);
